using System;
using System.ComponentModel.DataAnnotations;

namespace SIOGDE.AccesoDatos.Entidades
{
 public partial class RequerimientoConfig
 {
     public RequerimientoConfig()
     {
         Guid = System.Guid.NewGuid().ToString();
     }
     #region foreign Keys

     public virtual int ArmaId_FK {get;set;}
     private Arma ArmaId_obj ;
     public virtual Arma Arma
      {
          get { return ArmaId_obj; }
          set {
                ArmaId_obj = value;
                if (ArmaId_obj != null) ArmaId_FK = ArmaId_obj.Id; 
          }
      }

     public virtual int EspecialidadId_FK {get;set;}
     private Especialidad EspecialidadId_obj ;
     public virtual Especialidad Especialidad
      {
          get { return EspecialidadId_obj; }
          set {
                EspecialidadId_obj = value;
                if (EspecialidadId_obj != null) EspecialidadId_FK = EspecialidadId_obj.Id; 
          }
      }

     public virtual int GestionId_FK {get;set;}
     private Gestion GestionId_obj ;
     public virtual Gestion Gestion
      {
          get { return GestionId_obj; }
          set {
                GestionId_obj = value;
                if (GestionId_obj != null) GestionId_FK = GestionId_obj.Id; 
          }
      }

     public virtual int GradoId_FK {get;set;}
     private Grado GradoId_obj ;
     public virtual Grado Grado
      {
          get { return GradoId_obj; }
          set {
                GradoId_obj = value;
                if (GradoId_obj != null) GradoId_FK = GradoId_obj.Id; 
          }
      }

     public virtual int TipoCargoComandoId_FK {get;set;}
     private TipoCargoComando TipoCargoComandoId_obj ;

      [Display(Name = "Asignar Cargo")]
     public virtual TipoCargoComando TipoCargoComando
      {
          get { return TipoCargoComandoId_obj; }
          set {
                TipoCargoComandoId_obj = value;
                if (TipoCargoComandoId_obj != null) TipoCargoComandoId_FK = TipoCargoComandoId_obj.Id; 
          }
      }

     public virtual int UnidadMilitarId_FK {get;set;}
     private UnidadMilitar UnidadMilitarId_obj ;
     public virtual UnidadMilitar UnidadMilitar
      {
          get { return UnidadMilitarId_obj; }
          set {
                UnidadMilitarId_obj = value;
                if (UnidadMilitarId_obj != null) UnidadMilitarId_FK = UnidadMilitarId_obj.Id; 
          }
      }
     #endregion
     public virtual int   Id { get; set;}

     [StringLength(100, ErrorMessage = "{0} debe tener al menos {2} caracteres.", MinimumLength = 2)]
     [Display(Name = "Guid")]
     public virtual string   Guid { get; set;}

     [DataType(DataType.Date)]
     [Display(Name = "FechaRegistro")]
     public virtual DateTime   FechaRegistro { get; set;}

     [Required(ErrorMessage="NumPersonas es requerido.")]
     [Display(Name = "Num Personal")]
     public virtual int   NumPersonas { get; set;}

     [StringLength(50, ErrorMessage = "{0} debe tener al menos {2} caracteres.", MinimumLength = 2)]
     [Display(Name = "Autorizado Por")]
     public virtual string   AutorizadoPor { get; set;}

     [StringLength(10, ErrorMessage = "{0} debe tener al menos {2} caracteres.", MinimumLength = 2)]
     [Display(Name = "Registrado Por")]
     public virtual string   RegistradoPor { get; set;}

     [Display(Name = "Promocion Desde")]
     public virtual DateTime?   PromocionDesde { get; set;}

     [Display(Name = "Promocion Hasta")]
     public virtual DateTime?   PromocionHasta { get; set;}
 }
}

